<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>opusenc: GStreamer Base Plugins 1.0 Plugins Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual">
<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
<link rel="prev" href="gst-plugins-base-plugins-opusdec.html" title="opusdec">
<link rel="next" href="gst-plugins-base-plugins-overlaycomposition.html" title="overlaycomposition">
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gst-plugins-base-plugins-opusenc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#gst-plugins-base-plugins-opusenc.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
                  <a href="#gst-plugins-base-plugins-opusenc.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#gst-plugins-base-plugins-opusenc.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gst-plugins-base-plugins-opusdec.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-base-plugins-overlaycomposition.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gst-plugins-base-plugins-opusenc"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-opusenc.top_of_page"></a>opusenc</span></h2>
<p>opusenc</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--audio" title="The “audio” property">audio</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">GstOpusEncAudioType</span></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--audio-type" title="The “audio-type” property">audio-type</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">GstOpusEncBandwidth</span></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--bandwidth" title="The “bandwidth” property">bandwidth</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--bitrate" title="The “bitrate” property">bitrate</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEncBitrateType" title="enum GstOpusEncBitrateType"><span class="type">GstOpusEncBitrateType</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--bitrate-type" title="The “bitrate-type” property">bitrate-type</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--cbr" title="The “cbr” property">cbr</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--complexity" title="The “complexity” property">complexity</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--constrained-vbr" title="The “constrained-vbr” property">constrained-vbr</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--dtx" title="The “dtx” property">dtx</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">GstOpusEncFrameSize</span></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--frame-size" title="The “frame-size” property">frame-size</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--inband-fec" title="The “inband-fec” property">inband-fec</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--max-payload-size" title="The “max-payload-size” property">max-payload-size</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc--packet-loss-percentage" title="The “packet-loss-percentage” property">packet-loss-percentage</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<a name="GstOpusEnc"></a><div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEnc-struct" title="struct GstOpusEnc">GstOpusEnc</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEncBitrateType" title="enum GstOpusEncBitrateType">GstOpusEncBitrateType</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
                <span class="lineart">╰──</span> <a href="../html/GstAudioEncoder.html#GstAudioEncoder-struct">GstAudioEncoder</a>
                    <span class="lineart">╰──</span> GstOpusEnc
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GstOpusEnc implements
 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPreset.html#GstPreset-struct">GstPreset</a> and  <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagSetter.html#GstTagSetter-struct">GstTagSetter</a>.</p>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.description"></a><h2>Description</h2>
<p>This element encodes raw audio to OPUS.</p>
<div class="refsect3">
<a name="id-1.2.80.8.3"></a><h4>Example pipelines</h4>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v audiotestsrc wave<span class="gtkdoc opt">=</span>sine num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">100</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> opusenc <span class="gtkdoc opt">!</span> oggmux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>sine<span class="gtkdoc opt">.</span>ogg</pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
Encode a test sine signal to Ogg/OPUS.</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="refsect2">
<a name="id-1.2.80.8.4.1"></a><h3>Element Information</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">plugin</span></p></td>
<td>
            <a class="link" href="gst-plugins-base-plugins-plugin-opus.html#plugin-opus">opus</a>
          </td>
</tr>
<tr>
<td><p><span class="term">author</span></p></td>
<td>Vincent Penquerc'h &lt;vincent.penquerch@collabora.co.uk&gt;</td>
</tr>
<tr>
<td><p><span class="term">class</span></p></td>
<td>Codec/Encoder/Audio</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="id-1.2.80.8.4.2"></a><h3>Element Pads</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)[ 1, 8 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int){ 8000, 12000, 16000, 24000 }, channels=(int)[ 1, 8 ]</td>
</tr>
</tbody>
</table></div>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>src</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>source</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>audio/x-opus</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstOpusEnc-struct"></a><h3>struct GstOpusEnc</h3>
<pre class="programlisting">struct GstOpusEnc;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEncBitrateType"></a><h3>enum GstOpusEncBitrateType</h3>
<div class="refsect3">
<a name="GstOpusEncBitrateType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="BITRATE-TYPE-CBR:CAPS"></a>BITRATE_TYPE_CBR</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="BITRATE-TYPE-VBR:CAPS"></a>BITRATE_TYPE_VBR</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="BITRATE-TYPE-CONSTRAINED-VBR:CAPS"></a>BITRATE_TYPE_CONSTRAINED_VBR</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstOpusEnc--audio"></a><h3>The <code class="literal">“audio”</code> property</h3>
<pre class="programlisting">  “audio”                    <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Audio or voice (DEPRECATED: use audio-type).</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--audio-type"></a><h3>The <code class="literal">“audio-type”</code> property</h3>
<pre class="programlisting">  “audio-type”               <span class="type">GstOpusEncAudioType</span></pre>
<p>What type of audio to optimize for.</p>
<p>Flags: Read / Write</p>
<p>Default value: Generic audio</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--bandwidth"></a><h3>The <code class="literal">“bandwidth”</code> property</h3>
<pre class="programlisting">  “bandwidth”                <span class="type">GstOpusEncBandwidth</span></pre>
<p>Audio Band Width.</p>
<p>Flags: Read / Write</p>
<p>Default value: Full band</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--bitrate"></a><h3>The <code class="literal">“bitrate”</code> property</h3>
<pre class="programlisting">  “bitrate”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Specify an encoding bit-rate (in bps).</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [4000,650000]</p>
<p>Default value: 64000</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--bitrate-type"></a><h3>The <code class="literal">“bitrate-type”</code> property</h3>
<pre class="programlisting">  “bitrate-type”             <a class="link" href="gst-plugins-base-plugins-opusenc.html#GstOpusEncBitrateType" title="enum GstOpusEncBitrateType"><span class="type">GstOpusEncBitrateType</span></a></pre>
<p>Bitrate type.</p>
<p>Flags: Read / Write</p>
<p>Default value: CBR</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--cbr"></a><h3>The <code class="literal">“cbr”</code> property</h3>
<pre class="programlisting">  “cbr”                      <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Constant bit rate (DEPRECATED: use bitrate-type).</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--complexity"></a><h3>The <code class="literal">“complexity”</code> property</h3>
<pre class="programlisting">  “complexity”               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Complexity.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [0,10]</p>
<p>Default value: 10</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--constrained-vbr"></a><h3>The <code class="literal">“constrained-vbr”</code> property</h3>
<pre class="programlisting">  “constrained-vbr”          <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Constrained VBR (DEPRECATED: use bitrate-type).</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--dtx"></a><h3>The <code class="literal">“dtx”</code> property</h3>
<pre class="programlisting">  “dtx”                      <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>DTX.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--frame-size"></a><h3>The <code class="literal">“frame-size”</code> property</h3>
<pre class="programlisting">  “frame-size”               <span class="type">GstOpusEncFrameSize</span></pre>
<p>The duration of an audio frame, in ms.</p>
<p>Flags: Read / Write</p>
<p>Default value: 20</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--inband-fec"></a><h3>The <code class="literal">“inband-fec”</code> property</h3>
<pre class="programlisting">  “inband-fec”               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Enable forward error correction.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--max-payload-size"></a><h3>The <code class="literal">“max-payload-size”</code> property</h3>
<pre class="programlisting">  “max-payload-size”         <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
<p>Maximum payload size in bytes.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [2,4000]</p>
<p>Default value: 4000</p>
</div>
<hr>
<div class="refsect2">
<a name="GstOpusEnc--packet-loss-percentage"></a><h3>The <code class="literal">“packet-loss-percentage”</code> property</h3>
<pre class="programlisting">  “packet-loss-percentage”   <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Packet loss percentage.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [0,100]</p>
<p>Default value: 0</p>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-plugins-opusenc.see-also"></a><h2>See Also</h2>
<p>opusdec, oggmux</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>